let mongoose = require('mongoose')
let Schema = mongoose.Schema;

let signSchema = new Schema({
    begin_time: {type: Date, required: true},
    end_time: {type: Date, required: true},
    course_id: {type : Schema.Types.ObjectId, ref: 'course', required: true},
    site: {type: String, required: true},
    students: [{type: Schema.Types.ObjectId, ref: 'student', default: []}],
    create_time: {type: Date, default: Date.now},
})

module.exports = mongoose.model('sign', signSchema)